
#include "dominion.h"
#include "dominion_helpers.h"
#include <stdlib.h>
#include <stdio.h>
#include <assert.h>

void testBuyCard();


int main(int argc, char *argv[])
{
	testBuyCard();
    return 0;
}

void testBuyCard(){
	struct gameState *g;
	int b;

	// gameState struct isn't initialized here, so we should get some kind of graceful exit
	//b = buyCard(1,g); // buyCard should check if g was initialized with newGame()?
	
	g = newGame();
	g->numBuys = 0;
	g->numPlayers = 2;
	g->supplyCount[0] = 0;     // num of cards for given supplyPos
	g->whoseTurn = 0;       // 
	g->coins = 0;

	// should get -1 with "You do not have enough buys""
	b = buyCard(1, g);
	assert(b == -1);

	// should get -1 with "There are not any of that type of card left"
	g->numBuys = 1;
	b = buyCard(1,g);
	assert(b == -1);

	// should get -1 with "You do not have enough money..."
	g->supplyCount[1] = 1;
	b = buyCard(1,g);

	// if it get's here, buyCards passed all preconditions
	printf("Precondition checking in buyCard seems to work...\n");

}

